package cn.huiyunche.driver.datasync.schedule;

import cn.huiyunche.base.service.interfaces.DWaybillService;
import cn.huiyunche.base.service.interfaces.TmsOrderCallHistoryService;
import cn.huiyunche.base.service.interfaces.impl.TmsOrderCallHistoryServiceImpl;
import cn.huiyunche.base.service.utils.SpringApplication;
import cn.huiyunche.driver.service.*;
import cn.huiyunche.driver.service.impl.OrderServiceImpl;
import cn.huiyunche.driver.service.impl.TmsDDeliveryAuditServiceImpl;
import cn.huiyunche.driver.service.impl.TmsQueueDimensionServiceImpl;
import cn.huiyunche.driver.service.impl.TmsUpdateOrdersServiceImpl;
import cn.huiyunche.driver.service.impl.*;

/**
 * 定时任务工厂类
 *
 * @author hdy
 */
public class QuartzClusterFactory {

    /**
     * 定时任务 订单服务接口
     *
     * @return TmsOrderService
     */
    public static OrderService getOrderService() {
        return SpringApplication.getBean(OrderServiceImpl.class);
    }

    /**
     * 定时任务 订单派单接口
     *
     * @return TmsQueueDimensionService
     */
    public static TmsQueueDimensionService getTmsQueueDimensionService() {
        return SpringApplication.getBean(TmsQueueDimensionServiceImpl.class);
    }

    /**
     * 定时任务 查询TMS关联人送订单接口
     *
     * @return TmsQueueDimensionService
     */
    public static TmsUpdateOrdersService getTmsUpdateOrdersService() {
        return SpringApplication.getBean(TmsUpdateOrdersServiceImpl.class);
    }

    /**
     * 定时任务 订单流程历史接口
     *
     * @return TmsOrderCallHistoryService
     */
    public static TmsOrderCallHistoryService getTmsOrderCallHistoryService() {
        return SpringApplication.getBean(TmsOrderCallHistoryServiceImpl.class);
    }

    /**
     * 定时任务 订单交车接口
     *
     * @return TmsDDeliveryAuditService
     */
    public static TmsDDeliveryAuditService getTmsDDeliveryAuditService() {
        return SpringApplication.getBean(TmsDDeliveryAuditServiceImpl.class);
    }

    /**
     * 定时任务 订单抓取接口
     *
     * @return TmsDDeliveryAuditService
     */
    public static FetchTmsOrder getFetchTmsOrder() {
        return SpringApplication.getBean(FetchTmsOrder.class);
    }

    /**
     * 定时任务 计算运单价格接口
     *
     * @return TmsQueueCalculateService
     */
    public static TmsQueueCalculateService getTmsQueueCalculateService() {
        return SpringApplication.getBean(TmsQueueCalculateServiceImpl.class);
    }

    /**
     * 定时任务 otm抓取订单
     *
     * @return TmsQueueCalculateService
     */
    public static FetchOtmOrder fetchOtmOrder() {
        return SpringApplication.getBean(FetchOtmOrder.class);
    }

    /**
     * 定时任务 更新运单发运类型
     *
     * @return TmsQueueCalculateService
     */
    public static UpdateWaybillService updateWaybillService() {
        return SpringApplication.getBean(UpdateWaybillService.class);
    }

    public static DWaybillService DWaybillService() {
        return SpringApplication.getBean(DWaybillService.class);
    }
}
